import { reactive } from "vue";

interface EntityOption {
    labelWidth?: number
    span?: number
    mode?: string
    name?: string
}

export default class Base {

    private static initOption: EntityOption = {
        labelWidth: 100,
        span: 8
    }
    private _opts?: EntityOption

    constructor(opts?: EntityOption) {
        this.opts = { ...Base.initOption, ...opts }
    }

    get opts() {
        return this._opts
    }

    set opts(opts) {
        this._opts = opts
    }

    get active() {
        return reactive(this)
    }

    submit(_call: (done: () => void) => void) { }
}